#include <stdio.h>
#include <string.h>
#include <unistd.h>

int main(int argc, char *argv[]) {
    char *input_file = NULL;
    char *output_file = NULL;
    
    // Loop through arguments manually
    for (int i = 1; i < argc; i++) {
        if (strcmp(argv[i], "-in") == 0 && i + 1 < argc) {
            input_file = argv[i + 1];
            i++; // Skip next arg as it is the value for -in
        } else if (strcmp(argv[i], "-out") == 0 && i + 1 < argc) {
            output_file = argv[i + 1];
            i++; // Skip next arg as it is the value for -out
        } else {
            fprintf(stderr, "Usage: %s [-in input_file] [-out output_file]\n", argv[0]);
            return 1;
        }
    }

    if (input_file) {
        printf("Input file: %s\n", input_file);
    }

    if (output_file) {
        printf("Output file: %s\n", output_file);
    }

    return 0;
}

